CentOS 6
Sponsored Link

Install phpPgAdmin
2015/01/15
 
Install phpPgAdmin to operate PostgreSQL on web browser from Clients.
[1]
[2]
[3] Install phpPgAdmin.
# install from EPEL

[root@www ~]#
yum --enablerepo=epel -y install phpPgAdmin php-pgsql
[root@www ~]#
vi /etc/phpPgAdmin/config.inc.php
# line 18: add

$conf['servers'][0]['host'] = '
localhost
';
# line 94: add

$conf['owned_only'] =
true
;
[root@www ~]#
vi /var/lib/pgsql/data/pg_hba.conf
# line 72: change like follows to allow hosts to access

host    all         all         127.0.0.1/32          md5
host    all         all         10.0.0.0/24           md5
host    all         all         ::1/128               md5

[root@www ~]#
vi /etc/httpd/conf.d/phpPgAdmin.conf
# line 11: add IPs you allow to access

Allow from 127.0.0.1
10.0.0.0/24
[root@www ~]#
/etc/rc.d/init.d/httpd restart

Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[4] Access to the "http://(hostname or IP address)/phpPgAdmin" and click "PostgreSQL" on the left menu.
[5] Autenticate a user and password which is in PostgreSQL.
[6] Just logined. You can operate PostgreSQL on here.
 
Tweet